"""
@name : 循环结构-while
@author : wenyao
@projectname: xsfh
"""
#计算1-5和
# count = 0
# sum = 0
# while count<5:
#     count += 1
#     sum += count
# print(sum)

#########登录  密码最多输入3次
# username = input("please input your name:")
# if username == "root":
#     i = 0
#     while i<3:
#         i += 1
#         passwd = input("please input your password:")
#         if passwd == "123456":
#             print("登录成功！")
#             break
#         else:
#             print(f"登录失败,还剩{3-i}次机会")
# else:
#     print("请输入正确的用户名")

count = 0
sum = 0
while count<5:
    count += 1
    sum += count
    break
else:
    print("this is else")